#ifndef __GENERAL_H
#define __GENERAL_H

static __inline__ unsigned long long rdtsc(void)
{
  unsigned hi, lo;
  __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));
  return ( (unsigned long long)lo)|( ((unsigned long long)hi)<<32 );
}

typedef struct Statistics_S
{
  unsigned long long enqueue_time;
  unsigned long long num_enqueue;
  unsigned long long dequeue_time[32];
  unsigned long long num_dequeue[32];
  unsigned long long processing_time[32];
  unsigned long long schedule_overhead[32];
} Statistics;

#endif
